package com.module.home;

import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;


import com.orhanobut.logger.Logger;

import ren.nearby.http.base.BaseActivity;

/**
 * Created by Administrator on 2018/1/3 0003.
 */

public class GuidePages extends BaseActivity {
    private int[] mPagesColors;
    private static final int ACTUAL_PAGES_COUNT = 3;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home_we);
        mPagesColors = new int[]{
                ContextCompat.getColor(this, android.R.color.darker_gray),
                ContextCompat.getColor(this, android.R.color.holo_green_dark),
                ContextCompat.getColor(this, android.R.color.holo_red_dark),
                ContextCompat.getColor(this, android.R.color.holo_blue_dark),
                ContextCompat.getColor(this, android.R.color.holo_purple),
                ContextCompat.getColor(this, android.R.color.holo_orange_dark),
        };
        replaceTutorialFragment();
    }

    public void replaceTutorialFragment() {
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.container, new CustomPresentationPagerFragment())
                .commit();
    }

    @Override
    public void onIntent() {
        super.onIntent();
        //获取浏览器传送过过来的值
        Uri uri = getIntent().getData();
        if (uri != null) {
            String title = uri.getQueryParameter("title");
            Logger.e(" uri != null title = " + title);
        } else {
            Logger.e(" uri = null");
        }

    }
}
